<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" xmlns:head="http://www.w3.org/1999/html">
<head th:include="public/public_css::public_css ('系统日志')"/>

<body style="background-color: #f2f2f2;">
<div class="layui-fluid larry-wrapper">
    <div class="layui-card">
        <div class="layui-row layui-col-space30">
            <div class="layui-col-xs24">
                <form class="layui-form layui-card-header  layui-card-header-auto" id="searchForm">
                    <div class="layui-inline">
                        <label class="layui-form-label">错误级别</label>
                        <select name="jb" lay-filter="aihao">
                            <option value="">全部</option>
                            <option value="调试">调试</option>
                            <option value="信息">信息</option>
                            <option value="警告">警告</option>
                            <option value="错误">错误</option>
                            <option value="严重错误">严重错误</option>
                        </select>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">记录时间开始</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="jlsj_start" id="test5" placeholder="yyyy-MM-dd" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">  </label>
                        <div class="layui-input-inline" style="height:20px">
                            --
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">记录时间结束</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="jlsj_end" id="test6" placeholder="yyyy-MM-dd" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">处理状态</label>
                        <select name="clzt" lay-filter="aihao">
                            <option value="">全部</option>
                            <option value="0">未处理</option>
                            <option value="1">已处理</option>
                        </select>
                    </div>
                    <div class="layui-inline inline-search-btn">
                        <a class="layui-btn layui-btn-normal" data-type="reload">查询</a>
                    </div>
                </form>

                <!--列表-->
                <section class="panel panel-padding layui-card-body">
                    <div class="pro">
                        <table id="table" class="table text-nowrap"></table>
                    </div>
                </section>
            </div>
        </div>
    </div>
</div>

</body>


<div th:include="/public/public_js::public_js"></div>
<style type="text/css">
    .moreBtn {
        width: 50px;
        height: 20px;
        text-align: center;
        color: #fff;
        line-height: 20px;
        background-color: #eee;
        position: relative;
        margin: 0 auto;
        cursor: pointer;
    }

    .moreBtn:before {
        content: '';
        display: block;
        width: 35px;
        height: 20px;
        position: absolute;
        transform: skewX(30deg);
        background: #eee;
        border-top-left-radius: 8px;
        left: -20px;
        top: 0;
    }

    .moreBtn:after {
        content: '';
        display: block;
        width: 35px;
        height: 20px;
        position: absolute;
        transform: skewX(-30deg);
        background: #eee;
        border-top-right-radius: 8px;
        top: 0;
        right: -20px;
    }
</style>
<script>

    layui.use(['list', 'layer', 'zzpUtils', 'jquery', 'laydate'], function () {


        var zzpUtils = layui.zzpUtils,
            $ = layui.jquery,
            laydate = layui.laydate;

        //记录时间开始
        laydate.render({
            elem: '#test5'
            ,theme: '#20a0ff',
        })
        //记录时间结束
        laydate.render({
            elem: '#test6'
            ,theme: '#20a0ff',
        })
        var $table = zzpUtils.table({
            elem: '#table',
            isApi: true,
            pagination: true,
            url: '/sysLog/list',
            columns: [{
                field: 'jb',
                title: '错误级别'
            }, {
                field: 'mk',
                title: '模块'
            }, {
                field: 'an',
                title: '按钮'
            }, {
                field: 'jlsj',
                title: '记录时间'
            }, {
                field: 'clzt',
                title: '处理状态'
            }],
            queryParams: function () {//查询条件
                return zzpUtils.getFormJson($("#searchForm"));
            },
            detailFormatter: function (index, row) {
                return "这里就没有确定过11";
            }
        });

        //查询
        $(".inline-search-btn").on('click', function () {
            zzpUtils.refreshTable("#table");
        })
        /*新增周转规则*/
        $(".add-btn").on('click', function () {
            zzpUtils.dialog({
                title: "新增周转箱",
                type: 2,
                content: "/base/addTurnoverBox",
                area: ['50%', '50%'], //设置dialog大小，也可以不设置，
                end: function () {//增加成功后刷新
                    zzpUtils.refreshTable("#table");
                }
            });
        })
    });

</script>
</html>